{% block title %}{{ currnet_term }}{% endblock %}
{% block content %}
    {% for post in post_list %}
    <section class="post">
          <header class="entry-header">
            <img class="entry-avatar" alt="Paul Laros" height="52" width="52" src="http://127.0.0.1/{{ post.author.head_img }}">
            <h2 class="entry-title"><a href="http://127.0.0.1/post/{{ post.id }}/">{{ post.title }}</a></h2>
            <p class="entry-meta">
                <span>发布时间:</span>
                <span><a class="entry-date" href="#">{{ post.published_date|date:"Y-m-d H:i:s" }}</a></span>
                <span>作者:</span>
                <span><a class="entry-author" href="#">{{ post.author.name }}</a></span>
                <span>标签:</span>
                {% for tag in post.tag.split %}
                <span><a class="label label-danger" href="#l">{{ tag }}</a></span>
                {% endfor %}
                <span>分类:</span>
                <span><a class="label label-danger" href="http://127.0.0.1/search/term/{{ post.term.id }}/">{{ post.term.name }}</a></span>
            </p>
          </header>
          <div class="entry-description">
            <p>
              {{ post.summary }}
            </p>
          </div>
    </section> <!-- /.post -->
    {% endfor %}
    <nav>
        <ul class="pagination">
      {% if post_list.has_previous %}
          <li><a href="#" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li>
      {% endif %}
      {% for p in page_range %}
          {% if p == post_list.number %}
            <li class="active"><a href="?page={{ p }}">{{ p }}</a></li>
          {% else %}
            <li><a href="?page={{ p }}">{{ p }}</a></li>
          {% endif %}
      {% endfor %}
      {% if post_list.has_next %}
          <li><a href="?page={{ post_list.next_page_number }}" aria-label="Next"><span aria-hidden="true">&raquo;</span></a></li>
      {% endif %}
      </ul>
    </nav>
{% endblock %}